const koaRouter = require("koa-router");
const router = new koaRouter({
  prefix: "/roles",
});
const rolesRouter=require('../controller/roles')
router.get('/',rolesRouter.roles)
router.post('/',rolesRouter.addRoles)
router.get('/:id',rolesRouter.queryRole)
router.put('/:id',rolesRouter.updateRole)
router.delete('/:id',rolesRouter.deleteRole)
router.post('/:roleId/rights',rolesRouter.authorize)
module.exports=router